

///////////////////////////////////////////////////////////////////////////////////////////////////
///////////// Figure 2 - Binscatters Plots of Party Ideology and Attorney Ideology ////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////

graph set window fontface "Garamond"

*** Load the Data

use Data_OPO_LitigatingParties, clear


*** Panel A - Case Level
				
binscatter  litigant_dime_score atty_dime_score if counsel_of_record == 1 ,   n(20)  msymbol(O)  mcolors(black) lcolors(black) xlabel(-1.5(.5)1.5) scheme(s1mono) yscale(noextend) xscale(noextend) plotregion(style(none)) 	ytitle("Litigating Party CFscore" )	xtitle("Attorney CFscore" ) xsize(1) ysize(1) legend(off) ylabel(-.5(.25)1)

** Correlation for Text
correlate  litigant_dime_score atty_dime_score if counsel_of_record == 1	

** Sample Size for Text	
tab litigant_dime_score if mean_atty_overall !=. & counsel_of_record == 1 

*** Panel B - Litigating Party Level

binscatter  litigant_dime_score mean_atty_overall if dup<2,   n(20)  msymbol(O)  mcolors(black) lcolors(black) xlabel(-1.5(.5)1.5) scheme(s1mono) yscale(noextend) xscale(noextend) plotregion(style(none)) 	ytitle("Litigating Party CFscore" )	xtitle("Mean Attorney CFscore" ) xsize(1) ysize(1) legend(off) ylabel(-.5(.25)1)

** Correlation for Text
correlate  litigant_dime_score mean_atty_overall if dup<2

** Sample Size for Text	
tab litigant_dime_score if mean_atty_overall !=. & dup<2
